package com.study.util.desensitization.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.study.util.desensitization.deserializer.Desensitization;
import com.study.util.desensitization.serializer.ObjectDesensitizeSerializer;

/**
 * 对象脱敏、注解
 * 
 * @author chenk
 *
 */
@Target({ElementType.FIELD,ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotationsInside
@JsonSerialize(using = ObjectDesensitizeSerializer.class)
@Documented
public @interface Desensitize {
	/**
	 * 对象脱敏实现
	 * 
	 * @return
	 */
	Class<? extends Desensitization<?>> desensitization();
}
